FROM debian:12.11-slim
LABEL author=xiaoyilin
LABEL email=406735078@qq.com
ENV TZ=Asia/Shanghai
COPY caddy Caddyfile  /usr/local/caddy/
WORKDIR /usr/local/caddy
ENV SITE_ADDRESS=localhost
ENV SITE_PORT=2019
# 开发
ENV DEV_ADDRESS=localhost
ENV DEV_PORT=2020
# 测试
ENV TEST_ADDRESS=localhost
ENV TEST_PORT=2020
# 生产
ENV PRO_ADDRESS=localhost
ENV PRO_PORT=2020
ENV TZ=Asia/Shanghai
ENV PATH=$PATH:/usr/local/caddy/
CMD ["caddy","run","--watch","--config","Caddyfile"]  


# https://caddyserver.com/docs/getting-started
# docker build -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/caddy:2.10.2 .
# docker run --name caddy  -d registry.cn-hangzhou.aliyuncs.com/xiaoyilin/caddy:2.10.2
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/caddy:2.10.2